Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

submit signed transaction to diem #8

Merged
merged 6 commits into from
Apr 15, 2021

Conversation

goldenfiredo
Copy link
Contributor

No description provided.

src/main.rs Outdated
@@ -53,12 +53,14 @@ type XtClient = subxt::Client<Runtime>;
type PrClient = pruntime_client::PRuntimeClient;

const DIEM_CONTRACT_ID: u32 = 5;
const INTERVAL: u64 = 1_000 * 60 * 3;
const INTERVAL: u64 = 1_000 * 60 * 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change it to 15s (1_000 * 15)

src/main.rs Outdated
@@ -555,6 +555,46 @@ impl DiemBridge {
Err(Error::FailedToGetResponse)
}
}

async fn submit_signed_transaction(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
async fn submit_signed_transaction(
async fn maybe_submit_signed_transaction(

src/main.rs Outdated
if let QueryRespData::GetSignedTransactions { queue_b64 } = resp {
let data = base64::decode(&queue_b64).unwrap();
let transaction_data: Vec<TransactionData> = Decode::decode(&mut &data[..]).unwrap();
for td in transaction_data.clone() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for td in transaction_data.clone() {
for td in &transaction_data {

src/main.rs Outdated
Comment on lines 98 to 103
//sent_events_key: Option<BytesView>,
//received_events_key:Option<BytesView>,
//sent_events: Option<Vec<EventView>>,
//received_events: Option<Vec<EventView>>,
//transactions: Option<Vec<TransactionView>>,
//account: Option<AccountData>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the comments

src/main.rs Outdated
received_events: BTreeMap<String, Vec<EventView>>,
transactions: BTreeMap<String, Vec<TransactionView>>,
account: BTreeMap<String, AccountData>,
//balances: Option<Vec<AmountView>>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

@h4x3rotab h4x3rotab merged commit a37feea into Phala-Network:master Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants